package com.three.crm.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.three.crm.R;
import com.three.crm.bean.CallLogBean;

import java.util.List;

public class CallLogAdapter extends BaseQuickAdapter<CallLogBean, BaseViewHolder> {

    public CallLogAdapter(@Nullable List<CallLogBean> data) {
        super(R.layout.item_list_calllog,data);
    }

    public CallLogAdapter() {
        super(R.layout.item_list_calllog);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, CallLogBean item) {
        helper.setText(R.id.tv_name,item.getContactName())
                .setText(R.id.tv_time, item.getCallDateStr())
                .setText(R.id.tv_type, item.getCallTypeStr())
                .setText(R.id.tv_duration, item.getCallDurationStr());
    }
}
